package com.partner.service.withdraw;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.partner.bean.withdraw.Withdraw;
import com.partner.mapper.withdraw.WithdrawMapper;

@Service("withdraw")
public class WithdrawService {

	@Autowired
	private WithdrawMapper withdrawMapper;
	
	public WithdrawMapper getServiceMapper() {
		return withdrawMapper;
	}
	
	public int insert(Withdraw s) {
		int id =0 ;	
		try {
		   id =	withdrawMapper.insert(s);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return id ;
	}
	
	public List<Withdraw> selectAll(Withdraw withdraw) {
		return withdrawMapper.selectAll(withdraw);
	}
	
	public Withdraw selectByPrimaryId(Integer id){
		return withdrawMapper.selectByPrimaryId(id);
	}
	
	public int updateByPrimaryKey(Withdraw withdraw){
		return withdrawMapper.updateByPrimaryKey(withdraw);
	}

	public Integer gethasamount(int memberid) {
		return withdrawMapper.gethasamount(memberid);
	}

	public Integer report1(Withdraw withdraw) {
		return withdrawMapper.report1(withdraw);
	}
}
